<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../../../favicon.ico">

    <title>Offcanvas template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="{{ url_for('static', filename='css/offcanvas.css') }}" rel="stylesheet">
  </head>

  <body class="bg-light">
  
    <div class="nav-scroller bg-white shadow-sm">
      <nav class="nav nav-underline">
        <a class="nav-link active" href="{{ url_for('login') }}">登录</a>
        <a class="nav-link active" href="{{ url_for('logout') }}">退出</a>
        <a class="nav-link active" href="{{ url_for('register') }}">注册教室</a>
        <a class="nav-link active" href="{{ url_for('get_class', class_name=current_user.class_name) }}">
          课程主页
        </a>
        <a class="nav-link active" href="{{ url_for('class_search') }}">历史签到记录</a>
        <a class="nav-link active" href="{{ url_for('group', class_name=current_user.class_name) }}">
          学生分群
        </a>
      </nav>
    </div>
	
	
    <main role="main" class="container">
	  {% with messages = get_flashed_messages() %}
	  {% if messages %}
		  {% for message in messages %}
		  <div class="d-flex align-items-center p-2 my-2 text-white-50 bg-purple rounded shadow-sm">
            <div class="lh-100">
              <h6 class="mb-0 text-white lh-100">{{ message }}</h6>
            </div>
          </div>
		  {% endfor %}
	  {% endif %}
	  {% endwith %}
      <div class="d-flex align-items-center p-2 my-2 text-white-50 bg-purple rounded shadow-sm">
        <div class="lh-100">
          <h6 class="mb-0 text-white lh-100">欢迎来到{{ current_user.class_name }}</h6>
        </div>
      </div>

      <div class="d-flex align-items-center p-2 my-2 text-white-50 bg-purple rounded shadow-sm">
        <div class="lh-100">
          <h6 class="mb-0 text-white lh-100">{{ currentTime }}</h6>
        </div>
      </div>

      <div class="my-3 p-3 bg-white rounded shadow-sm" id="message-box">
        <h6 class="border-bottom border-gray pb-2 mb-0">Update</h6>
        <div class="media text-muted pt-3">
          <p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
            <strong class="d-block text-gray-dark">@username</strong>
            加入了课堂
          </p>
        </div>
      </div>
    </main>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://js.pusher.com/4.3/pusher.min.js"></script>
	<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
     crossorigin="anonymous"></script>
	<script src="{{ url_for('static', filename='js/message.js') }}"></script>
  </body>
</html>